package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 * @author hua
 * @since 2023-06-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_order_repair")
public class OrderRepairDo extends Model<OrderRepairDo> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 维修单号
     */
    @TableField("repair_no")
    private String repairNo;

    @TableField("company_id")
    private Long companyId;

    @TableField("status")
    private String status;

    /**
     * 退货单号
     */
    @TableField("back_no")
    private String backNo;

    /**
     * 退货单id
     */
    @TableField("back_id")
    private Long backId;

    @TableField("type")
    private Integer type;

    /**
     * 客户单号
     */
    @TableField("customer_no")
    private String customerNo;

    /**
     * 客户姓名
     */
    @TableField("customer_name")
    private String customerName;

    /**
     * 所在仓库
     */
    @TableField("storage_id")
    private Long storageId;

    /**
     * 故障描述
     */
    @TableField("fault_description")
    private String faultDescription;

    /**
     * 维修故障描述
     */
    @TableField("repair_description")
    private String repairDescription;

    /**
     * 维修收费类型 0 按单 1按件数
     */
    @TableField("charge_type")
    private Integer chargeType;

    /**
     * 维修费用
     */
    @TableField("repair_cost")
    private Double repairCost;

    /**
     * 维修费用总和
     */
    @TableField("repair_cost_total")
    private Double repairCostTotal;

    /**
     * 币种
     */
    @TableField("currency")
    private Long currency;

    /**
     * 维修结果 0 维修完成 1无法维修
     */
    @TableField("repair_result")
    private Integer repairResult;

    /**
     * 无法维修原因
     */
    @TableField("fault_reason")
    private String faultReason;

    /**
     * 客户指示 0 指示上架 1指示废弃
     */
    @TableField("cus_indicate")
    private Integer cusIndicate;

    /**
     * 完成指示 0 上架 1废弃
     */
    @TableField("indicate_result")
    private Integer indicateResult;

    @TableField("create_time")
    private Date createTime;

    @TableField("create_by")
    private Long createBy;

    @TableField("update_time")
    private Date updateTime;

    @TableField("update_by")
    private Long updateBy;

    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
